<template>
  <div class="notic_wrap">
      <h2>通知公告</h2>
      <ul>
        <li v-for="(item,index) in noticeList" :key="index" >
          <img :src="item.icon" alt="">
          <div class="info">
            <div>{{item.notice}}</div>
            <p>{{item.createTime}}</p>
          </div>
        </li>
      </ul>
  </div>
</template>

<script>
import {getNoticeApi} from '@/api/home'
export default {
  name: 'Vue2304BNotice',

  data() {
    return {
      noticeList:[]//通知列表数据
    };
  },
  created(){
    this.getNotice();
  },
  mounted() {
    
  },

  methods: { 

    async getNotice(){//获取首页通知列表接口
        let res=await getNoticeApi();
        console.log(res,"00000000000")
        this.noticeList=res;

    }
  },
};
</script>
<style lang="scss" scoped>
  .notic_wrap{
    width:100%;
    padding:0 20px;
    box-sizing:border-box;
    height:430px;
    margin-top:20px;
    ul{
        width:100%;
        li{
          display:flex;
          align-items:center;
          list-style:none;
          height:70px;
          font-size:15px;
          img{
            width:40px;
            height:40px;
            margin-right:20px;
          }
          p{
            color:#ccc;
          }
        }
    }
  }
</style>